/*********************************************************************
*
*   rob_main.cpp - Robot main module
*
*   Copyright:
*       Software source code by Alex Morozov and Chris D. Locke is
*       licensed under a Creative Commons Attribution-Noncommercial-
*       Share Alike 3.0 United States License
*       (http://creativecommons.org/licenses/by-nc-sa/3.0/us/)
*
*********************************************************************/
#include "RobotBase.h"
#include "CppBot.h"

RobotBase *                 robot_ptr = NULL;

void rob_get_pos
    (
    float *             hdg,
    float *             x,
    float *             y
    )
{
if( robot_ptr != NULL )
    {
    robot_ptr->GetRobotPosition( x, y, hdg );
    }
}

void rob_get_motors
    (
    int *               rt,
    int *               lt
    )
{
if( robot_ptr != NULL )
    {
    robot_ptr->GetMotorSpeed( lt, rt );
    }
}


void rob_prdc
    ( void )
{
// Update the robot
if( robot_ptr != NULL )
    {
    robot_ptr->Update( );
    }
}

